package com.softstao.guoyu.mvp.interactor;

import com.softstao.guoyu.global.APIInterface;
import com.softstao.guoyu.model.Code;
import com.softstao.guoyu.utils.MyHttpParams;

import rx.functions.Action1;

/**
 * Created by vaikus on 2017/7/8.
 */

public class ForgetPassInteractor extends BaseInteractor {
    public void sendCode(String mobile, Action1<Object> action1){
        MyHttpParams params = new MyHttpParams("mobile",mobile);
        builder.setAction(action1)
                .setUrl(APIInterface.CHANGE_PSD_CODE)
                .setType(Code.class)
                .getVolley()
                .post(params);
    }

    public void changePsd(String mobile,String code,String newPassWord,String verifyPassword,Action1<Object> action1){
        MyHttpParams params = new MyHttpParams("mobile",mobile,"code",code,"newPassWord",newPassWord,"verifyPassword",verifyPassword);
        builder.setAction(action1)
                .setUrl(APIInterface.CHANGE_PSD)
                .setType(null)
                .getVolley()
                .post(params);
    }
}
